
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>bent_plume_model.Model &#8212; Texas A&amp;M Oil spill / Outfall Calculator 2.1.0 documentation</title>
    <link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
    <script src="../../_static/jquery.js"></script>
    <script src="../../_static/underscore.js"></script>
    <script src="../../_static/doctools.js"></script>
    <script src="../../_static/language_data.js"></script>
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="bent_plume_model.Model.load_sim" href="bent_plume_model.Model.load_sim.html" />
    <link rel="prev" title="Overview of Bent Plume Model Module" href="../../modules/bpm.html" />
   
  <link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  <div class="section" id="bent-plume-model-model">
<h1>bent_plume_model.Model<a class="headerlink" href="#bent-plume-model-model" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="bent_plume_model.Model">
<em class="property">class </em><code class="sig-prename descclassname">bent_plume_model.</code><code class="sig-name descname">Model</code><span class="sig-paren">(</span><em class="sig-param">profile=None</em>, <em class="sig-param">simfile=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/bent_plume_model.html#Model"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#bent_plume_model.Model" title="Permalink to this definition">¶</a></dt>
<dd><p>Master class object for controlling and post-processing the simulation</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl>
<dt><strong>profile</strong><span class="classifier"><cite>ambient.Profile</cite> object, default = None</span></dt><dd><p>An object containing the ambient CTD data and associated methods.
The netCDF dataset stored in the <cite>ambient.Profile</cite> object may be open
or closed at instantiation.  If open, the initializer will close the
file since this model does not support changing the ambient data once
initialized.</p>
</dd>
<dt><strong>simfile: str, default = None</strong></dt><dd><p>File name of a netCDF file containing the results of a previous
simulation run.</p>
</dd>
</dl>
</dd>
</dl>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<dl class="simple">
<dt><a class="reference internal" href="bent_plume_model.Model.simulate.html#bent_plume_model.Model.simulate" title="bent_plume_model.Model.simulate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">simulate</span></code></a>, <a class="reference internal" href="bent_plume_model.Model.save_sim.html#bent_plume_model.Model.save_sim" title="bent_plume_model.Model.save_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_sim</span></code></a>, <a class="reference internal" href="bent_plume_model.Model.save_txt.html#bent_plume_model.Model.save_txt" title="bent_plume_model.Model.save_txt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_txt</span></code></a>, <a class="reference internal" href="bent_plume_model.Model.load_sim.html#bent_plume_model.Model.load_sim" title="bent_plume_model.Model.load_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">load_sim</span></code></a>, <a class="reference internal" href="bent_plume_model.plot_state_space.html#bent_plume_model.plot_state_space" title="bent_plume_model.plot_state_space"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_state_space</span></code></a></dt><dd></dd>
<dt><a class="reference internal" href="bent_plume_model.plot_all_variables.html#bent_plume_model.plot_all_variables" title="bent_plume_model.plot_all_variables"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_all_variables</span></code></a></dt><dd></dd>
</dl>
</div>
<dl class="field-list">
<dt class="field-odd">Attributes</dt>
<dd class="field-odd"><dl>
<dt><strong>profile</strong><span class="classifier"><cite>ambient.Profile</cite></span></dt><dd><p>Ambient CTD data</p>
</dd>
<dt><strong>got_profile</strong><span class="classifier">bool</span></dt><dd><p>Flag indicating whether or not the profile object was successfully
loaded into the <cite>Model</cite> object memory</p>
</dd>
<dt><strong>p</strong><span class="classifier"><cite>ModelParams</cite></span></dt><dd><p>Container for the fixed model parameters</p>
</dd>
<dt><strong>sim_stored</strong><span class="classifier">bool</span></dt><dd><p>Flag indicating whether or not a simulation result is stored in the
object memory</p>
</dd>
<dt><strong>X</strong><span class="classifier">ndarray</span></dt><dd><p>Release location (x, y, z) in (m)</p>
</dd>
<dt><strong>D</strong><span class="classifier">float</span></dt><dd><p>Diameter for the equivalent circular cross-section of the release (m)</p>
</dd>
<dt><strong>Vj</strong><span class="classifier">float</span></dt><dd><p>Scalar value of the magnitude of the discharge velocity for continuous
phase fluid in the discharge.  This variable should be 0. or None for
a pure multiphase discharge.</p>
</dd>
<dt><strong>phi_0</strong><span class="classifier">float</span></dt><dd><p>Vertical angle from the horizontal for the discharge orientation
(rad in range +/- pi/2)</p>
</dd>
<dt><strong>theta_0</strong><span class="classifier">float</span></dt><dd><p>Horizontal angle from the x-axis for the discharge orientation.  The
x-axis is taken in the direction of the ambient current.  (rad in
range 0 to 2 pi)</p>
</dd>
<dt><strong>Sj</strong><span class="classifier">float</span></dt><dd><p>Salinity of the continuous phase fluid in the discharge (psu)</p>
</dd>
<dt><strong>Tj</strong><span class="classifier">float</span></dt><dd><p>Temperature of the continuous phase fluid in the discharge (K)</p>
</dd>
<dt><strong>cj</strong><span class="classifier">ndarray</span></dt><dd><p>Concentration of passive tracers in the discharge (user-defined)</p>
</dd>
<dt><strong>tracers</strong><span class="classifier">string list</span></dt><dd><p>List of passive tracers in the discharge.  These can be chemicals
present in the ambient <cite>profile</cite> data, and if so, entrainment of these
chemicals will change the concentrations computed for these tracers.
However, none of these concentrations are used in the dissolution of
the dispersed phase.  Hence, <cite>tracers</cite> should not contain any
chemicals present in the dispersed phase particles.</p>
</dd>
<dt><strong>particles</strong><span class="classifier">list of <cite>Particle</cite> objects</span></dt><dd><p>List of <cite>Particle</cite> objects describing each dispersed phase in the
simulation</p>
</dd>
<dt><strong>track</strong><span class="classifier">bool</span></dt><dd><p>Flag indicating whether or not to track the particle through
the water column using the <cite>single_bubble_model</cite>.</p>
</dd>
<dt><strong>dt_max</strong><span class="classifier">float</span></dt><dd><p>Maximum step size to take in the storage of the simulation solution
(s)</p>
</dd>
<dt><strong>sd_max</strong><span class="classifier">float</span></dt><dd><p>Maximum number of orifice diameters to compute the solution along
the plume centerline (m/m)</p>
</dd>
<dt><strong>K_T0</strong><span class="classifier">ndarray</span></dt><dd><p>Array of heat transfer reduction factors for the particle objects
which is used to restart heat transfer after the simulation ends
since during simulation, heat transfer is turned off.</p>
</dd>
<dt><strong>chem_names</strong><span class="classifier">string list</span></dt><dd><p>List of chemical parameters to track for the dissolution.  Only the
parameters in this list will be used to set background concentration
for the dissolution, and the concentrations of these parameters are
computed separately from those listed in <cite>tracers</cite> or inputed from
the discharge through <cite>cj</cite>.</p>
</dd>
<dt><strong>q_local</strong><span class="classifier"><cite>LagElement</cite> object</span></dt><dd><p>Object that translates the <cite>Model</cite> state space <cite>t</cite> and <cite>q</cite> into the
comprehensive list of derived variables.</p>
</dd>
<dt><strong>t</strong><span class="classifier">ndarray</span></dt><dd><p>Array of times computed in the solution (s)</p>
</dd>
<dt><strong>q</strong><span class="classifier">ndarray</span></dt><dd><p>Array of state space values computed in the solution</p>
</dd>
</dl>
</dd>
</dl>
<p class="rubric">Methods</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="bent_plume_model.Model.load_sim.html#bent_plume_model.Model.load_sim" title="bent_plume_model.Model.load_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">load_sim</span></code></a>(self, fname)</p></td>
<td><p>Load in a saved simulation result file for post-processing</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="bent_plume_model.Model.plot_all_variables.html#bent_plume_model.Model.plot_all_variables" title="bent_plume_model.Model.plot_all_variables"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_all_variables</span></code></a>(self, fig)</p></td>
<td><p>Plot a comprehensive suite of simulation results</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="bent_plume_model.Model.plot_state_space.html#bent_plume_model.Model.plot_state_space" title="bent_plume_model.Model.plot_state_space"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_state_space</span></code></a>(self, fig)</p></td>
<td><p>Plot the simulation state space</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="bent_plume_model.Model.save_sim.html#bent_plume_model.Model.save_sim" title="bent_plume_model.Model.save_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_sim</span></code></a>(self, fname, profile_path, profile_info)</p></td>
<td><p>Save the current simulation results</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="bent_plume_model.Model.save_txt.html#bent_plume_model.Model.save_txt" title="bent_plume_model.Model.save_txt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_txt</span></code></a>(self, base_name, profile_path, …)</p></td>
<td><p>Save the state space in ascii text format for exporting</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="bent_plume_model.Model.simulate.html#bent_plume_model.Model.simulate" title="bent_plume_model.Model.simulate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">simulate</span></code></a>(self, X, D, Vj, phi_0, theta_0, Sj, …)</p></td>
<td><p>Simulate the plume dynamics from given initial conditions</p></td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="bent_plume_model.Model.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">profile=None</em>, <em class="sig-param">simfile=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/bent_plume_model.html#Model.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#bent_plume_model.Model.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<p class="rubric">Methods</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#bent_plume_model.Model.__init__" title="bent_plume_model.Model.__init__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">__init__</span></code></a>(self[, profile, simfile])</p></td>
<td><p>Initialize self.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="bent_plume_model.Model.load_sim.html#bent_plume_model.Model.load_sim" title="bent_plume_model.Model.load_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">load_sim</span></code></a>(self, fname)</p></td>
<td><p>Load in a saved simulation result file for post-processing</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="bent_plume_model.Model.plot_all_variables.html#bent_plume_model.Model.plot_all_variables" title="bent_plume_model.Model.plot_all_variables"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_all_variables</span></code></a>(self, fig)</p></td>
<td><p>Plot a comprehensive suite of simulation results</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="bent_plume_model.Model.plot_state_space.html#bent_plume_model.Model.plot_state_space" title="bent_plume_model.Model.plot_state_space"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_state_space</span></code></a>(self, fig)</p></td>
<td><p>Plot the simulation state space</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="bent_plume_model.Model.save_sim.html#bent_plume_model.Model.save_sim" title="bent_plume_model.Model.save_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_sim</span></code></a>(self, fname, profile_path, profile_info)</p></td>
<td><p>Save the current simulation results</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="bent_plume_model.Model.save_txt.html#bent_plume_model.Model.save_txt" title="bent_plume_model.Model.save_txt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_txt</span></code></a>(self, base_name, profile_path, …)</p></td>
<td><p>Save the state space in ascii text format for exporting</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="bent_plume_model.Model.simulate.html#bent_plume_model.Model.simulate" title="bent_plume_model.Model.simulate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">simulate</span></code></a>(self, X, D, Vj, phi_0, theta_0, Sj, …)</p></td>
<td><p>Simulate the plume dynamics from given initial conditions</p></td>
</tr>
</tbody>
</table>
</dd></dl>

</div>


          </div>
          
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../index.html">Texas A&M Oil spill / Outfall Calculator</a></h1>








<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../../user_manual.html">TAMOC User Manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../unit_tests.html">Unit Tests</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary.html">Glossary</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../bugs.html">Reporting Bugs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../readme.html">Read Me File</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../release.html">Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../license.html">License</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../../index.html">Documentation overview</a><ul>
  <li><a href="../../user_manual.html">TAMOC User Manual</a><ul>
  <li><a href="../../modules/bpm.html">Overview of Bent Plume Model Module</a><ul>
      <li>Previous: <a href="../../modules/bpm.html" title="previous chapter">Overview of Bent Plume Model Module</a></li>
      <li>Next: <a href="bent_plume_model.Model.load_sim.html" title="next chapter">bent_plume_model.Model.load_sim</a></li>
  </ul></li>
  </ul></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>








        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2020, Scott A. Socolofsky.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
      
      |
      <a href="../../_sources/autodoc/bpm/bent_plume_model.Model.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>